3.1.17 \(\int \frac {\sin ^6(x)}{a+b \cos ^2(x)} \, dx\) [17]

3.1.17.1 Optimal result
3.1.17.2 Mathematica [A] (verified)
3.1.17.3 Rubi [A] (verified)
3.1.17.4 Maple [A] (verified)
3.1.17.5 Fricas [A] (verification not implemented)
3.1.17.6 Sympy [F(-1)]
3.1.17.7 Maxima [A] (verification not implemented)
3.1.17.8 Giac [A] (verification not implemented)
3.1.17.9 Mupad [B] (verification not implemented)

3.1.17.1 Optimal result

Integrand size = 15, antiderivative size = 88 \[ \int \frac {\sin ^6(x)}{a+b \cos ^2(x)} \, dx=-\frac {\left (8 a^2+20 a b+15 b^2\right ) x}{8 b^3}-\frac {(a+b)^{5/2} \arctan \left (\frac {\sqrt {a+b} \cot (x)}{\sqrt {a}}\right )}{\sqrt {a} b^3}+\frac {(4 a+7 b) \cos (x) \sin (x)}{8 b^2}+\frac {\cos (x) \sin ^3(x)}{4 b} \]

output
-1/8*(8*a^2+20*a*b+15*b^2)*x/b^3+1/8*(4*a+7*b)*cos(x)*sin(x)/b^2+1/4*cos(x 
)*sin(x)^3/b-(a+b)^(5/2)*arctan(cot(x)*(a+b)^(1/2)/a^(1/2))/b^3/a^(1/2)
 
3.1.17.2 Mathematica [A] (verified)

Time = 0.18 (sec) , antiderivative size = 77, normalized size of antiderivative = 0.88 \[ \int \frac {\sin ^6(x)}{a+b \cos ^2(x)} \, dx=\frac {-4 \left (8 a^2+20 a b+15 b^2\right ) x+\frac {32 (a+b)^{5/2} \arctan \left (\frac {\sqrt {a} \tan (x)}{\sqrt {a+b}}\right )}{\sqrt {a}}+8 b (a+2 b) \sin (2 x)-b^2 \sin (4 x)}{32 b^3} \]

input
Integrate[Sin[x]^6/(a + b*Cos[x]^2),x]
 
output
(-4*(8*a^2 + 20*a*b + 15*b^2)*x + (32*(a + b)^(5/2)*ArcTan[(Sqrt[a]*Tan[x] 
)/Sqrt[a + b]])/Sqrt[a] + 8*b*(a + 2*b)*Sin[2*x] - b^2*Sin[4*x])/(32*b^3)
 
3.1.17.3 Rubi [A] (verified)

Time = 0.33 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.30, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.467, Rules used = {3042, 3670, 316, 402, 397, 216, 218}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\sin ^6(x)}{a+b \cos ^2(x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\cos \left (x+\frac {\pi }{2}\right )^6}{a+b \sin \left (x+\frac {\pi }{2}\right )^2}dx\)

\(\Big \downarrow \) 3670

\(\displaystyle -\int \frac {1}{\left (\cot ^2(x)+1\right )^3 \left ((a+b) \cot ^2(x)+a\right )}d\cot (x)\)

\(\Big \downarrow \) 316

\(\displaystyle \frac {\cot (x)}{4 b \left (\cot ^2(x)+1\right )^2}-\frac {\int \frac {-3 (a+b) \cot ^2(x)+a+4 b}{\left (\cot ^2(x)+1\right )^2 \left ((a+b) \cot ^2(x)+a\right )}d\cot (x)}{4 b}\)

\(\Big \downarrow \) 402

\(\displaystyle \frac {\cot (x)}{4 b \left (\cot ^2(x)+1\right )^2}-\frac {\frac {\int \frac {4 a^2+9 b a+8 b^2-(a+b) (4 a+7 b) \cot ^2(x)}{\left (\cot ^2(x)+1\right ) \left ((a+b) \cot ^2(x)+a\right )}d\cot (x)}{2 b}-\frac {(4 a+7 b) \cot (x)}{2 b \left (\cot ^2(x)+1\right )}}{4 b}\)

\(\Big \downarrow \) 397

\(\displaystyle \frac {\cot (x)}{4 b \left (\cot ^2(x)+1\right )^2}-\frac {\frac {\frac {8 (a+b)^3 \int \frac {1}{(a+b) \cot ^2(x)+a}d\cot (x)}{b}-\frac {\left (8 a^2+20 a b+15 b^2\right ) \int \frac {1}{\cot ^2(x)+1}d\cot (x)}{b}}{2 b}-\frac {(4 a+7 b) \cot (x)}{2 b \left (\cot ^2(x)+1\right )}}{4 b}\)

\(\Big \downarrow \) 216

\(\displaystyle \frac {\cot (x)}{4 b \left (\cot ^2(x)+1\right )^2}-\frac {\frac {\frac {8 (a+b)^3 \int \frac {1}{(a+b) \cot ^2(x)+a}d\cot (x)}{b}-\frac {\left (8 a^2+20 a b+15 b^2\right ) \arctan (\cot (x))}{b}}{2 b}-\frac {(4 a+7 b) \cot (x)}{2 b \left (\cot ^2(x)+1\right )}}{4 b}\)

\(\Big \downarrow \) 218

\(\displaystyle \frac {\cot (x)}{4 b \left (\cot ^2(x)+1\right )^2}-\frac {\frac {\frac {8 (a+b)^{5/2} \arctan \left (\frac {\sqrt {a+b} \cot (x)}{\sqrt {a}}\right )}{\sqrt {a} b}-\frac {\left (8 a^2+20 a b+15 b^2\right ) \arctan (\cot (x))}{b}}{2 b}-\frac {(4 a+7 b) \cot (x)}{2 b \left (\cot ^2(x)+1\right )}}{4 b}\)

input
Int[Sin[x]^6/(a + b*Cos[x]^2),x]
 
output
Cot[x]/(4*b*(1 + Cot[x]^2)^2) - ((-(((8*a^2 + 20*a*b + 15*b^2)*ArcTan[Cot[ 
x]])/b) + (8*(a + b)^(5/2)*ArcTan[(Sqrt[a + b]*Cot[x])/Sqrt[a]])/(Sqrt[a]* 
b))/(2*b) - ((4*a + 7*b)*Cot[x])/(2*b*(1 + Cot[x]^2)))/(4*b)
 

3.1.17.3.1 Defintions of rubi rules used

rule 216
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A 
rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a 
, 0] || GtQ[b, 0])
 

rule 218
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R 
t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
 

rule 316
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Sim 
p[(-b)*x*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q + 1)/(2*a*(p + 1)*(b*c - a*d)) 
), x] + Simp[1/(2*a*(p + 1)*(b*c - a*d))   Int[(a + b*x^2)^(p + 1)*(c + d*x 
^2)^q*Simp[b*c + 2*(p + 1)*(b*c - a*d) + d*b*(2*(p + q + 2) + 1)*x^2, x], x 
], x] /; FreeQ[{a, b, c, d, q}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] &&  ! 
( !IntegerQ[p] && IntegerQ[q] && LtQ[q, -1]) && IntBinomialQ[a, b, c, d, 2, 
 p, q, x]
 

rule 397
Int[((e_) + (f_.)*(x_)^2)/(((a_) + (b_.)*(x_)^2)*((c_) + (d_.)*(x_)^2)), x_ 
Symbol] :> Simp[(b*e - a*f)/(b*c - a*d)   Int[1/(a + b*x^2), x], x] - Simp[ 
(d*e - c*f)/(b*c - a*d)   Int[1/(c + d*x^2), x], x] /; FreeQ[{a, b, c, d, e 
, f}, x]
 

rule 402
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_.)*((e_) + (f_.)*(x 
_)^2), x_Symbol] :> Simp[(-(b*e - a*f))*x*(a + b*x^2)^(p + 1)*((c + d*x^2)^ 
(q + 1)/(a*2*(b*c - a*d)*(p + 1))), x] + Simp[1/(a*2*(b*c - a*d)*(p + 1)) 
 Int[(a + b*x^2)^(p + 1)*(c + d*x^2)^q*Simp[c*(b*e - a*f) + e*2*(b*c - a*d) 
*(p + 1) + d*(b*e - a*f)*(2*(p + q + 2) + 1)*x^2, x], x], x] /; FreeQ[{a, b 
, c, d, e, f, q}, x] && LtQ[p, -1]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3670
Int[cos[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^( 
p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[ff/f   Su 
bst[Int[(a + (a + b)*ff^2*x^2)^p/(1 + ff^2*x^2)^(m/2 + p + 1), x], x, Tan[e 
 + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[m/2] && IntegerQ[p]
 
3.1.17.4 Maple [A] (verified)

Time = 1.40 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.07

method result size
default \(\frac {\left (a +b \right )^{3} \arctan \left (\frac {a \tan \left (x \right )}{\sqrt {\left (a +b \right ) a}}\right )}{b^{3} \sqrt {\left (a +b \right ) a}}-\frac {\frac {\left (-\frac {1}{2} a b -\frac {9}{8} b^{2}\right ) \left (\tan ^{3}\left (x \right )\right )+\left (-\frac {1}{2} a b -\frac {7}{8} b^{2}\right ) \tan \left (x \right )}{\left (\tan ^{2}\left (x \right )+1\right )^{2}}+\frac {\left (8 a^{2}+20 a b +15 b^{2}\right ) \arctan \left (\tan \left (x \right )\right )}{8}}{b^{3}}\) \(94\)
risch \(-\frac {x \,a^{2}}{b^{3}}-\frac {5 x a}{2 b^{2}}-\frac {15 x}{8 b}-\frac {i {\mathrm e}^{2 i x} a}{8 b^{2}}-\frac {i {\mathrm e}^{2 i x}}{4 b}+\frac {i {\mathrm e}^{-2 i x} a}{8 b^{2}}+\frac {i {\mathrm e}^{-2 i x}}{4 b}-\frac {a \sqrt {-\left (a +b \right ) a}\, \ln \left ({\mathrm e}^{2 i x}+\frac {2 i \sqrt {-\left (a +b \right ) a}+2 a +b}{b}\right )}{2 b^{3}}-\frac {\sqrt {-\left (a +b \right ) a}\, \ln \left ({\mathrm e}^{2 i x}+\frac {2 i \sqrt {-\left (a +b \right ) a}+2 a +b}{b}\right )}{b^{2}}-\frac {\sqrt {-\left (a +b \right ) a}\, \ln \left ({\mathrm e}^{2 i x}+\frac {2 i \sqrt {-\left (a +b \right ) a}+2 a +b}{b}\right )}{2 a b}+\frac {a \sqrt {-\left (a +b \right ) a}\, \ln \left ({\mathrm e}^{2 i x}-\frac {2 i \sqrt {-\left (a +b \right ) a}-2 a -b}{b}\right )}{2 b^{3}}+\frac {\sqrt {-\left (a +b \right ) a}\, \ln \left ({\mathrm e}^{2 i x}-\frac {2 i \sqrt {-\left (a +b \right ) a}-2 a -b}{b}\right )}{b^{2}}+\frac {\sqrt {-\left (a +b \right ) a}\, \ln \left ({\mathrm e}^{2 i x}-\frac {2 i \sqrt {-\left (a +b \right ) a}-2 a -b}{b}\right )}{2 a b}-\frac {\sin \left (4 x \right )}{32 b}\) \(335\)

input
int(sin(x)^6/(a+b*cos(x)^2),x,method=_RETURNVERBOSE)
 
output
(a+b)^3/b^3/((a+b)*a)^(1/2)*arctan(a*tan(x)/((a+b)*a)^(1/2))-1/b^3*(((-1/2 
*a*b-9/8*b^2)*tan(x)^3+(-1/2*a*b-7/8*b^2)*tan(x))/(tan(x)^2+1)^2+1/8*(8*a^ 
2+20*a*b+15*b^2)*arctan(tan(x)))
 
3.1.17.5 Fricas [A] (verification not implemented)

Time = 0.27 (sec) , antiderivative size = 285, normalized size of antiderivative = 3.24 \[ \int \frac {\sin ^6(x)}{a+b \cos ^2(x)} \, dx=\left [\frac {2 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} \sqrt {-\frac {a + b}{a}} \log \left (\frac {{\left (8 \, a^{2} + 8 \, a b + b^{2}\right )} \cos \left (x\right )^{4} - 2 \, {\left (4 \, a^{2} + 3 \, a b\right )} \cos \left (x\right )^{2} - 4 \, {\left ({\left (2 \, a^{2} + a b\right )} \cos \left (x\right )^{3} - a^{2} \cos \left (x\right )\right )} \sqrt {-\frac {a + b}{a}} \sin \left (x\right ) + a^{2}}{b^{2} \cos \left (x\right )^{4} + 2 \, a b \cos \left (x\right )^{2} + a^{2}}\right ) - {\left (8 \, a^{2} + 20 \, a b + 15 \, b^{2}\right )} x - {\left (2 \, b^{2} \cos \left (x\right )^{3} - {\left (4 \, a b + 9 \, b^{2}\right )} \cos \left (x\right )\right )} \sin \left (x\right )}{8 \, b^{3}}, -\frac {4 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} \sqrt {\frac {a + b}{a}} \arctan \left (\frac {{\left ({\left (2 \, a + b\right )} \cos \left (x\right )^{2} - a\right )} \sqrt {\frac {a + b}{a}}}{2 \, {\left (a + b\right )} \cos \left (x\right ) \sin \left (x\right )}\right ) + {\left (8 \, a^{2} + 20 \, a b + 15 \, b^{2}\right )} x + {\left (2 \, b^{2} \cos \left (x\right )^{3} - {\left (4 \, a b + 9 \, b^{2}\right )} \cos \left (x\right )\right )} \sin \left (x\right )}{8 \, b^{3}}\right ] \]

input
integrate(sin(x)^6/(a+b*cos(x)^2),x, algorithm="fricas")
 
output
[1/8*(2*(a^2 + 2*a*b + b^2)*sqrt(-(a + b)/a)*log(((8*a^2 + 8*a*b + b^2)*co 
s(x)^4 - 2*(4*a^2 + 3*a*b)*cos(x)^2 - 4*((2*a^2 + a*b)*cos(x)^3 - a^2*cos( 
x))*sqrt(-(a + b)/a)*sin(x) + a^2)/(b^2*cos(x)^4 + 2*a*b*cos(x)^2 + a^2)) 
- (8*a^2 + 20*a*b + 15*b^2)*x - (2*b^2*cos(x)^3 - (4*a*b + 9*b^2)*cos(x))* 
sin(x))/b^3, -1/8*(4*(a^2 + 2*a*b + b^2)*sqrt((a + b)/a)*arctan(1/2*((2*a 
+ b)*cos(x)^2 - a)*sqrt((a + b)/a)/((a + b)*cos(x)*sin(x))) + (8*a^2 + 20* 
a*b + 15*b^2)*x + (2*b^2*cos(x)^3 - (4*a*b + 9*b^2)*cos(x))*sin(x))/b^3]
 
3.1.17.6 Sympy [F(-1)]

Timed out. \[ \int \frac {\sin ^6(x)}{a+b \cos ^2(x)} \, dx=\text {Timed out} \]

input
integrate(sin(x)**6/(a+b*cos(x)**2),x)
 
output
Timed out
 
3.1.17.7 Maxima [A] (verification not implemented)

Time = 0.33 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.27 \[ \int \frac {\sin ^6(x)}{a+b \cos ^2(x)} \, dx=\frac {{\left (4 \, a + 9 \, b\right )} \tan \left (x\right )^{3} + {\left (4 \, a + 7 \, b\right )} \tan \left (x\right )}{8 \, {\left (b^{2} \tan \left (x\right )^{4} + 2 \, b^{2} \tan \left (x\right )^{2} + b^{2}\right )}} - \frac {{\left (8 \, a^{2} + 20 \, a b + 15 \, b^{2}\right )} x}{8 \, b^{3}} + \frac {{\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \arctan \left (\frac {a \tan \left (x\right )}{\sqrt {{\left (a + b\right )} a}}\right )}{\sqrt {{\left (a + b\right )} a} b^{3}} \]

input
integrate(sin(x)^6/(a+b*cos(x)^2),x, algorithm="maxima")
 
output
1/8*((4*a + 9*b)*tan(x)^3 + (4*a + 7*b)*tan(x))/(b^2*tan(x)^4 + 2*b^2*tan( 
x)^2 + b^2) - 1/8*(8*a^2 + 20*a*b + 15*b^2)*x/b^3 + (a^3 + 3*a^2*b + 3*a*b 
^2 + b^3)*arctan(a*tan(x)/sqrt((a + b)*a))/(sqrt((a + b)*a)*b^3)
 
3.1.17.8 Giac [A] (verification not implemented)

Time = 0.32 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.35 \[ \int \frac {\sin ^6(x)}{a+b \cos ^2(x)} \, dx=-\frac {{\left (8 \, a^{2} + 20 \, a b + 15 \, b^{2}\right )} x}{8 \, b^{3}} + \frac {{\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} {\left (\pi \left \lfloor \frac {x}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (a\right ) + \arctan \left (\frac {a \tan \left (x\right )}{\sqrt {a^{2} + a b}}\right )\right )}}{\sqrt {a^{2} + a b} b^{3}} + \frac {4 \, a \tan \left (x\right )^{3} + 9 \, b \tan \left (x\right )^{3} + 4 \, a \tan \left (x\right ) + 7 \, b \tan \left (x\right )}{8 \, {\left (\tan \left (x\right )^{2} + 1\right )}^{2} b^{2}} \]

input
integrate(sin(x)^6/(a+b*cos(x)^2),x, algorithm="giac")
 
output
-1/8*(8*a^2 + 20*a*b + 15*b^2)*x/b^3 + (a^3 + 3*a^2*b + 3*a*b^2 + b^3)*(pi 
*floor(x/pi + 1/2)*sgn(a) + arctan(a*tan(x)/sqrt(a^2 + a*b)))/(sqrt(a^2 + 
a*b)*b^3) + 1/8*(4*a*tan(x)^3 + 9*b*tan(x)^3 + 4*a*tan(x) + 7*b*tan(x))/(( 
tan(x)^2 + 1)^2*b^2)
 
3.1.17.9 Mupad [B] (verification not implemented)

Time = 2.79 (sec) , antiderivative size = 681, normalized size of antiderivative = 7.74 \[ \int \frac {\sin ^6(x)}{a+b \cos ^2(x)} \, dx=\frac {\frac {{\mathrm {tan}\left (x\right )}^3\,\left (4\,a+9\,b\right )}{8\,b^2}+\frac {\mathrm {tan}\left (x\right )\,\left (4\,a+7\,b\right )}{8\,b^2}}{{\mathrm {tan}\left (x\right )}^4+2\,{\mathrm {tan}\left (x\right )}^2+1}-\frac {\mathrm {atanh}\left (\frac {95\,a^2\,\mathrm {tan}\left (x\right )\,\sqrt {-a^6-5\,a^5\,b-10\,a^4\,b^2-10\,a^3\,b^3-5\,a^2\,b^4-a\,b^5}}{32\,\left (2\,a\,b^4+\frac {469\,a^4\,b}{32}+\frac {215\,a^5}{32}+\frac {287\,a^2\,b^3}{32}+\frac {517\,a^3\,b^2}{32}+\frac {5\,a^6}{4\,b}\right )}+\frac {5\,a^3\,\mathrm {tan}\left (x\right )\,\sqrt {-a^6-5\,a^5\,b-10\,a^4\,b^2-10\,a^3\,b^3-5\,a^2\,b^4-a\,b^5}}{4\,\left (\frac {5\,a^6}{4}+\frac {215\,a^5\,b}{32}+\frac {469\,a^4\,b^2}{32}+\frac {517\,a^3\,b^3}{32}+\frac {287\,a^2\,b^4}{32}+2\,a\,b^5\right )}+\frac {2\,a\,\mathrm {tan}\left (x\right )\,\sqrt {-a^6-5\,a^5\,b-10\,a^4\,b^2-10\,a^3\,b^3-5\,a^2\,b^4-a\,b^5}}{2\,a\,b^3+\frac {517\,a^3\,b}{32}+\frac {469\,a^4}{32}+\frac {287\,a^2\,b^2}{32}+\frac {215\,a^5}{32\,b}+\frac {5\,a^6}{4\,b^2}}\right )\,\sqrt {-a\,{\left (a+b\right )}^5}}{a\,b^3}+\frac {\mathrm {atan}\left (\frac {5717\,a^3\,\mathrm {tan}\left (x\right )}{256\,\left (\frac {15\,a\,b^2}{4}+\frac {3665\,a^2\,b}{256}+\frac {5717\,a^3}{256}+\frac {1143\,a^4}{64\,b}+\frac {235\,a^5}{32\,b^2}+\frac {5\,a^6}{4\,b^3}\right )}+\frac {3665\,a^2\,\mathrm {tan}\left (x\right )}{256\,\left (\frac {15\,a\,b}{4}+\frac {3665\,a^2}{256}+\frac {5717\,a^3}{256\,b}+\frac {1143\,a^4}{64\,b^2}+\frac {235\,a^5}{32\,b^3}+\frac {5\,a^6}{4\,b^4}\right )}+\frac {1143\,a^4\,\mathrm {tan}\left (x\right )}{64\,\left (\frac {15\,a\,b^3}{4}+\frac {5717\,a^3\,b}{256}+\frac {1143\,a^4}{64}+\frac {3665\,a^2\,b^2}{256}+\frac {235\,a^5}{32\,b}+\frac {5\,a^6}{4\,b^2}\right )}+\frac {235\,a^5\,\mathrm {tan}\left (x\right )}{32\,\left (\frac {15\,a\,b^4}{4}+\frac {1143\,a^4\,b}{64}+\frac {235\,a^5}{32}+\frac {3665\,a^2\,b^3}{256}+\frac {5717\,a^3\,b^2}{256}+\frac {5\,a^6}{4\,b}\right )}+\frac {5\,a^6\,\mathrm {tan}\left (x\right )}{4\,\left (\frac {5\,a^6}{4}+\frac {235\,a^5\,b}{32}+\frac {1143\,a^4\,b^2}{64}+\frac {5717\,a^3\,b^3}{256}+\frac {3665\,a^2\,b^4}{256}+\frac {15\,a\,b^5}{4}\right )}+\frac {15\,a\,b\,\mathrm {tan}\left (x\right )}{4\,\left (\frac {15\,a\,b}{4}+\frac {3665\,a^2}{256}+\frac {5717\,a^3}{256\,b}+\frac {1143\,a^4}{64\,b^2}+\frac {235\,a^5}{32\,b^3}+\frac {5\,a^6}{4\,b^4}\right )}\right )\,\left (a^2\,8{}\mathrm {i}+a\,b\,20{}\mathrm {i}+b^2\,15{}\mathrm {i}\right )\,1{}\mathrm {i}}{8\,b^3} \]

input
int(sin(x)^6/(a + b*cos(x)^2),x)
 
output
((tan(x)^3*(4*a + 9*b))/(8*b^2) + (tan(x)*(4*a + 7*b))/(8*b^2))/(2*tan(x)^ 
2 + tan(x)^4 + 1) + (atan((5717*a^3*tan(x))/(256*((15*a*b^2)/4 + (3665*a^2 
*b)/256 + (5717*a^3)/256 + (1143*a^4)/(64*b) + (235*a^5)/(32*b^2) + (5*a^6 
)/(4*b^3))) + (3665*a^2*tan(x))/(256*((15*a*b)/4 + (3665*a^2)/256 + (5717* 
a^3)/(256*b) + (1143*a^4)/(64*b^2) + (235*a^5)/(32*b^3) + (5*a^6)/(4*b^4)) 
) + (1143*a^4*tan(x))/(64*((15*a*b^3)/4 + (5717*a^3*b)/256 + (1143*a^4)/64 
 + (3665*a^2*b^2)/256 + (235*a^5)/(32*b) + (5*a^6)/(4*b^2))) + (235*a^5*ta 
n(x))/(32*((15*a*b^4)/4 + (1143*a^4*b)/64 + (235*a^5)/32 + (3665*a^2*b^3)/ 
256 + (5717*a^3*b^2)/256 + (5*a^6)/(4*b))) + (5*a^6*tan(x))/(4*((15*a*b^5) 
/4 + (235*a^5*b)/32 + (5*a^6)/4 + (3665*a^2*b^4)/256 + (5717*a^3*b^3)/256 
+ (1143*a^4*b^2)/64)) + (15*a*b*tan(x))/(4*((15*a*b)/4 + (3665*a^2)/256 + 
(5717*a^3)/(256*b) + (1143*a^4)/(64*b^2) + (235*a^5)/(32*b^3) + (5*a^6)/(4 
*b^4))))*(a*b*20i + a^2*8i + b^2*15i)*1i)/(8*b^3) - (atanh((95*a^2*tan(x)* 
(- a*b^5 - 5*a^5*b - a^6 - 5*a^2*b^4 - 10*a^3*b^3 - 10*a^4*b^2)^(1/2))/(32 
*(2*a*b^4 + (469*a^4*b)/32 + (215*a^5)/32 + (287*a^2*b^3)/32 + (517*a^3*b^ 
2)/32 + (5*a^6)/(4*b))) + (5*a^3*tan(x)*(- a*b^5 - 5*a^5*b - a^6 - 5*a^2*b 
^4 - 10*a^3*b^3 - 10*a^4*b^2)^(1/2))/(4*(2*a*b^5 + (215*a^5*b)/32 + (5*a^6 
)/4 + (287*a^2*b^4)/32 + (517*a^3*b^3)/32 + (469*a^4*b^2)/32)) + (2*a*tan( 
x)*(- a*b^5 - 5*a^5*b - a^6 - 5*a^2*b^4 - 10*a^3*b^3 - 10*a^4*b^2)^(1/2))/ 
(2*a*b^3 + (517*a^3*b)/32 + (469*a^4)/32 + (287*a^2*b^2)/32 + (215*a^5)...